<extend name="Base/common"/>
<block name="body">
<body style="background:#faf8f8;">
		<!--修改密码-->
		<form action="{:U('forgetPwd')}" class="form-pwd"  method="post">
		<div id="CgePasWd">
			<header><a href="{:U('login')}" class="back"><img src="__IMG__/images/back_03.png"/></a>修改密码</header>
			<ul>
				<li>
					<div class="number">
						<input type="text" class="input-reg test" id="number" name="mobile" placeholder="请输入手机号" maxlength="11" />
					</div>
				</li>
				<li>
					<div class="number">
						<input type="text" class="input-reg test" id="number" name="password" placeholder="请输入新密码" maxlength="16" />
					</div>
				</li>
				<li>
					<input type="text" class="input-reg test" id="password" name="con" placeholder="验证码" style="width:360px; float:left;" />
					<input type="button" onclick="settime(this)" class="click-yzm" value="获取短信验证码" style="width:260px; float:right; background:#FFFFFF;">
				</li>
			</ul>
			<input class="ajax-post" target-form="form-pwd" type="submit" id="btn" name="" value="确认" />
		</div>
		</form>
		<script>
			var countdown=60;
			function settime(obj) {
			    if (countdown == 0) {
			        obj.removeAttribute("disabled");
			        obj.value="获取短信验证码";
			        countdown = 60;
					return;
			    } else {
			        obj.setAttribute("disabled", true);
			        obj.value="重新发送(" + countdown + ")";
			        countdown--;
			    }
			setTimeout(function() {
			    settime(obj) }
			    ,1000)
			}
			$('.click-yzm').on('click',function(){
				var mobile = $('#number').val();
				$.ajax({
					url: "{:U('UserMember/ajaxYzm')}",
					type: 'POST',
					dataType: 'json',
					data: {mobile: mobile},
					success:function(data){
						layer.msg(data);
					}
				});
			});
		</script>
	</body>
</block>